package com.situ.stmall.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.situ.stmall.entity.Address;
import com.situ.stmall.mapper.AddressMapper;
import com.situ.stmall.service.AddressService;

@Service
public class AddressServiceImpl implements AddressService{

	
	@Autowired
	private AddressMapper addressMapper;
	
	@Override
	public List getByUserId(Integer userId) {
		List addresses = addressMapper.selectByUserId(userId);
		return addresses;
	}

	@Override
	public Address getById(Integer addressId) {
		
		return addressMapper.selectByPrimaryKey(addressId);
	}

}
